-- GENERATED SPELL FOR [Commander Mograine] --


function spell0_20345(pUnit, Event) --@Touched by the Light,Self--
pUnit:FullCastSpellOnTarget(35172,pUnit)
pUnit:RegisterEvent('Sorts_20345', 587, 1)
end

function Sorts_20345(pUnit, Event)
local choix_sorts_20345 = math.random(0, 0)
if choix_sorts_20345 == 0 then
pUnit:RegisterEvent('spell0_20345', 1, 1)
end
end

function mob20345_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20345', math.random(1500, 3000), 1)
end

function mob20345_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20345_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20345_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20345, 1, 'mob20345_Action')
RegisterUnitEvent(20345, 2, 'mob20345_Leave')
RegisterUnitEvent(20345, 3, 'mob20345_Kill')
RegisterUnitEvent(20345, 4, 'mob20345_Die')
